<template>
  <div class="home-page">
     <router-view></router-view> 
    <van-tabbar route v-if="!router.meta.showTarbar">
      <van-tabbar-item  to="/home" icon="home-o">首页</van-tabbar-item> 
      <van-tabbar-item  to="/category" icon="apps-o"
        >分类</van-tabbar-item
      >
      <van-tabbar-item  to="/mi-blog" icon="fire-o"
        >分享</van-tabbar-item
      >
      <van-tabbar-item  to="/cart" icon="shopping-cart-o"
        >购物车</van-tabbar-item
      >
      <van-tabbar-item  to="/user" icon="contact">我的</van-tabbar-item>
    </van-tabbar>

  </div>
</template>
  
<script>
import { ref } from "vue";
import { useRoute, useRouter } from 'vue-router'
import {defineComponent} from 'vue'
export default defineComponent( {
  setup() {
    const active = ref("home");
    const router = useRoute()
    return { active ,router };
  },
})
</script>
  
<style scoped lang="scss">
.van-nav-bar__content{
  background-color: #f5f5f5;
 }
.van-nav-bar .van-icon {
    color: black;
}
</style>